import {
  request
} from './request'
//获取歌单信息
export function getPlayListDetail(id) {
  return request({
    url: 'playlist/detail?cookie=' + sessionStorage.getItem("cookie"),
    params: {
      id
    }
  })
}

//获取歌单评论
export function getComment(id, limit, offset) {
  return request({
    url: '/comment/playlist',
    params: {
      id,
      limit,
      offset
    }
  })
}

//获取歌单歌曲列表信息
export function getMusicDetailList(ids) {
  return request({
    url: '/song/detail',
    params: {
      ids
    }
  })
}


//获取热门搜索
export function getHotSearch() {
  return request({
    url: '/search/hot/detail?cookie=' + sessionStorage.getItem("cookie"),
    params: {

    }
  })
}

//获取歌词
export function getLyric(id) {
  return request({
    url: '/lyric',
    params: {
      id
    }
  })
}

//获取歌曲评论

export function getMusicComment(id, limit) {
  return request({
    url: '/comment/music',
    params: {
      id,
      limit
    }
  })
}

//喜欢音乐
export function getLikeMusic(id, like) {
  return request({
    url: '/like?cookie=' + sessionStorage.getItem("cookie"),
    params: {
      id,
      like
    }
  })
}

//喜欢音乐列表

export function getLikeMusicList(uid) {
  return request({
    url: '/likelist?cookie=' + sessionStorage.getItem("cookie"),
    params: {
      uid
    }
  })
}

//给评论点赞

export function getCommentLike(id, cid, t, type) {
  return request({
    url: '/comment/like?cookie=' + sessionStorage.getItem("cookie"),
    params: {
      id,
      cid,
      t,
      type
    }
  })
}
//给动态点赞
export function getEventLike(cid, threadId, t, type) {
  return request({
    url: '/comment/like?cookie=' + sessionStorage.getItem("cookie"),
    params: {
      cid,
      threadId,
      t,
      type
    }
  })
}

//发送评论
export function sendComment(t, type, id, content, commentId) {
  return request({
    url: '/comment?cookie=' + sessionStorage.getItem("cookie"),
    params: {
      t,
      type,
      id,
      content,
      commentId
    }
  })
}



